﻿using Lidgren.Network;
using Model.Nova;

namespace Network.Messages.Nova
{
    /// <summary>
    /// 无人值守的注册状态回馈
    /// </summary>
    public class ResponseNoManOnDutyRegistrationCompletedMessage : NovaMessage
    {
      

        public ResponseNoManOnDutyRegistrationCompletedMessage()
            : base((ushort) CustomMessageType.ResponseNoManOnDutyRegistrationCompleted)
        {
        }

        public MachineLookupTable.Status Result { get; set; }

        public override void WritePayload(NetOutgoingMessage message)
        {
            base.WritePayload(message);
            message.Write((byte)Result);
        }

        public override void ReadPayload(NetIncomingMessage message)
        {
            base.ReadPayload(message);
            Result = (MachineLookupTable.Status) message.ReadByte();
        }
    }
}